<include file="./head" />
<body>
<div class="page theme-diy" id="page-index">
  <header class="bar bar-nav"> <a class="icon icon-left pull-left pull-left back"></a>
    <h1 class="title">分销收益</h1>
  </header>
 

  <div class="content native-scroll fx_bar" style="overflow-y:scroll;overflow-x:hidden;">
 
    <if condition="(!I('get.item_id')) AND (!I('get.type')) ">
    <div class="fenx_bar">
      <div class="card">
        <div class="card-header">订单统计</div>
        <div class="card-content">
          <div class="card-content-inner"> 待发货订单：{$dai.count}个，预计分成：{$dai.suk_ticheng}元 <br />
            发货中订单：{$yi.count}个，预计分成：{$yi.suk_ticheng}元 </div>
        </div>
      </div>
      <div class="card">
        <div class="card-header">签收订单</div>
        <div class="card-content">
          <div class="card-content-inner">
            已结算订单：{$shou.count} 个，实际返款：{$shou.suk_ticheng}元 </div>
        </div>
      </div>
      <div class="card">
        <div class="card-header">无效订单</div>
        <div class="card-content">
          <div class="card-content-inner"> 
            无效订单：{$wu.count} 个,损失分成：{$wu.suk_ticheng} 元<br />
            已拒收订单：{$ju.count}个,损失分成：{$ju.suk_ticheng} 元 
            </div>
        </div>
      </div>
    </div>
</if>

    <div class="card">
      <div class="card-header">订单明细</div>
      <div class="card-content">
        <div class="card-content-inner so">
          <form action="" method="get">
          <div class="so2">
            <select name="item_id">
               <option value="">请选择分销商品</option>
              <?php foreach($shop_list as $v):?>
              <option value="<?php echo $v['id'];?>" <?php if($v['id']==I('get.item_id')){?> selected <?php }?>><?php echo $v['title'];?></option>
              <?php endforeach;?>
            </select>
          </div>
          <div class="so2">
            <select class="left" style=" width:70%" name="type">
              <option value="">选择订单状态</option>
              <option value="1" <?php if(1==I('get.type')){?> selected <?php }?>>等待处理</option>
              <option value="2" <?php if(2==I('get.type')){?> selected <?php }?>>等待发货</option>
              <option value="9" <?php if(9==I('get.type')){?> selected <?php }?>>等待确认中</option>
              <option value="3" <?php if(3==I('get.type')){?> selected <?php }?>>发货中</option>
              <option value="4" <?php if(4==I('get.type')){?> selected <?php }?>>已签收</option>
              <option  value="5" <?php if(5==I('get.type')){?> selected <?php }?>>拒收</option>
              <option  value="7" <?php if(7==I('get.type')){?> selected <?php }?> >无效订单</option>
            </select>
            <button class="button right icon icon-search right" style="height:31px;">查看</button>
            </form>
          </div>
        </div>
      </div>
    </div>
    
 <?php foreach($order_list as $v):?>
   <!--a href="<?php echo U("/User/Share/order",array('id'=>$v['order_id']));?>"-->
    <div class="card">
      <div class="card-content">
        <div class="list-block media-list">
          <ul>
            <li class="item-content">
              <div class="item-media"> <img src="<?php echo $v['litpic'];?>" width="50"> </div>
              <div class="item-inner">
                <div class="item-title-row">
                  <div class="item-title"><?php echo $v['title']; ?></div>
                </div>
                <div class="item-subtitle" style=" font-size:12px;">订购价格:<?php echo $v['suk_price'];?>  返款:<?php echo $v['suk_ticheng']?> 时间:<?php echo date('y-m-d h:i',$v['time']);?></div>
              </div>
            </li>
          </ul>
        </div>
      </div>
      <div class="card-footer">
       <span>状态:<?php echo order_type($v['type']);?></span>
       <span>ID:<?php echo $v['order_id']; ?></span>
      </div>
    </div>
    <!---/a-->
    <?php endforeach;?>
   
    <div style="height:2.4rem;"></div>
  </div>
 
</div>
<include file="./foot" />